import { createRouter, createWebHistory } from 'vue-router'

const publicRoutes = [
  {
    path: '/',
    component: () => import('@/views/Home.vue'),
    children: [
      {
        path: '',
        redirect: '/pose-feasibility'
      },
      {
        path: 'pose-feasibility',
        component: () => import('@/views/PoseFeasibility.vue'),
      },
      {
        path: 'target-optimization',
        component: () => import('@/views/TargetOptimization.vue'),
      },
      {
        path: 'tolerances-design',
        component: () => import('@/views/ToleranceDesign.vue'),
      },
    ]
  },
]

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: publicRoutes,
})

export default router
